]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
dbusServices/extensions: Mention extension name in description
authorFlorian Müllner <fmuellner@gnome.org>
Thu, 22 May 2025 01:25:00 +0000 (03:25 +0200)
committerMarge Bot <marge-bot@gnome.org>
Fri, 1 Aug 2025 08:57:44 +0000 (08:57 +0000)
The extension name is still useful information, so mention it in
the description now that it is no longer in the title.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3750>

js/dbusServices/extensions/extensionPrefsDialog.js
js/dbusServices/extensions/ui/extension-error-page.ui

index 284ae0b972cdd847bcfd94d1569687bd9f67f7f6..01d6258f2ec77f6dd9b45295a535000a77afe589 100644 (file)
@@ -81,6 +81,7 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage {
         'resource:///org/gnome/Shell/Extensions/ui/extension-error-page.ui';
 
     static [Gtk.internalChildren] = [
+        'descriptionLabel',
         'expander',
         'expanderArrow',
         'revealer',
@@ -106,11 +107,18 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage {
 
         this._addCustomStylesheet();
 
-        this._uuid = extension.uuid;
-        this._url = extension.metadata.url || '';
+        const {uuid, name, url} = extension.metadata;
+
+        this._url = url;
 
         this.action_set_enabled('page.show-url', this._url !== '');
 
+        const label =
+            /* Translators: %s is an extension name */
+            _('Unable to display the settings for “%s”.')
+                .format(GLib.markup_escape_text(name, -1));
+        this._descriptionLabel.set({label});
+
         this._gesture = new Gtk.GestureClick({
             button: 0,
             exclusive: true,
@@ -136,7 +144,7 @@ class ExtensionPrefsErrorPage extends Adw.PreferencesPage {
 
         // markdown for pasting in gitlab issues
         let lines = [
-            `The settings of extension ${this._uuid} had an error:`,
+            `The settings of extension ${uuid} had an error:`,
             '```',
             formattedError.replace(/\n$/, ''),  // remove trailing newline
             '```',
index 012b6b8f087a6dbae05f2c464cf72b52cfdbca8f..7648eb42836068a2ca7b8a6ef36e221f8e0faf6e 100644 (file)
             <property name="orientation">vertical</property>
             <property name="spacing">12</property>
             <child>
-              <object class="GtkLabel">
-                <property name="label" translatable="yes">We’re very sorry, but there’s been a problem: the settings for this extension can’t be displayed. We recommend that you report the issue to the extension authors.</property>
+              <object class="GtkLabel" id="descriptionLabel">
                 <property name="justify">center</property>
                 <property name="wrap">True</property>
+                <property name="use-markup">True</property>
               </object>
             </child>
             <child>